a lot of the fixes in this commit were supposed to fix backwards
compatability with python 2.7
backwards compatability will actually be abandoned for now becasue
of the way unicode is handled in python2.

python3 is the requirement, tested with python 3.4 and 3.5

now we can focus on real function clean up and implementing bca.py as
a library/module
